package com.toivan.mt.fragment;

import android.os.Bundle;


import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.shizhefei.fragment.LazyFragment;
import com.toivan.mt.R;
import com.toivan.mt.adapter.MtEffectFilterAdapter;
import com.toivan.mt.adapter.MtToneFilterAdapter;
import com.toivan.mt.model.MtEffectFilterEnum;
import com.toivan.mt.model.MtToneFilterEnum;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class MtToneFilterFragment extends LazyFragment {
    private final List<MtToneFilterEnum> filterList = new ArrayList<>();

    @Override
    protected void onCreateViewLazy(Bundle savedInstanceState) {
        super.onCreateViewLazy(savedInstanceState);

        setContentView(R.layout.fragment_recyclerview);

        filterList.clear();
        filterList.addAll(Arrays.asList(MtToneFilterEnum.values()));

        RecyclerView filterRV = (RecyclerView) findViewById(R.id.recyclerView);
        MtToneFilterAdapter filterAdapter = new MtToneFilterAdapter(filterList);
        filterRV.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
        filterRV.setAdapter(filterAdapter);
    }
}
